home *** CD-ROM | disk | FTP | other *** search
Text File | 1985-10-01 | 5.3 KB | 178 lines | [FGHT/CWAR] |
- *
- * Downtown Jack
- * Courtesy of Bob Schumaker [72227,2103]
- *
- * a multi-process program that so far handles everything that
- * I have thrown against it. It stop worms, survives dwarves,
- * stakes vampires (or else lets them kill themselves), laughs
- * at imps, tromps geminis, and eats cannons of both flavors
- * for breakfast. Admittedly this has not been exhaustively
- * tested for all kinds of enemy programs, but it is guaranteed
- * to win against:
- *
- * the standard '5' dwarf -- from any starting address
- * a worm -- although it can sometimes take a looooong time
- * an imp
- *
- * If anyone improves on this program or comes up with a
- * program that it can't handle (not too difficult, really)
- * I'd love to see it!
- *
- * thanks go out to Kurt Jaeger (KJ) for the blindingly (!)
- * fast copy routine that made this monstrosity possible!
- *
- @-1044 * start is +56
- target dat 0
- @-2
- impwall dat 0
- math dat 0
- @0
- firstin pct impwall * for fast imps
- mov dwarf1,saved1
- mov dwarf2,saved2
- mov dwarf3,saved3
- mov bomber,saveb
- mov #(target-start),begin
- mov begin,dst
- add #(ending-start),dst
- add #(start-dst),dst * don't forget relativity
- mov dst,dstval * build fences to detect
- mov begin,fence1 * enemy activity
- add #140,fence1
- mov fence1,fence2
- sub #2,fence2
- mov fence2,fence3
- sub #2,fence3
- mov fence3,fence4
- sub #2,fence4
- mov fence4,fencep
- sub #2,fencep * for imps later
- sub #(fence2-fence1),fence2
- sub #(fence3-fence1),fence3
- sub #(fence4-fence1),fence4
- sub #(fencep-fence1),fencep
- sub #(begin-start),begin
- mov #0,killpt
- sub begin,killpt
- sub #(killpt-junk),killpt
- jmp start0 * start the ballgame
- @53
- src dat 0
- dst dat 0
- loopcnt dat 0
- @56
- start mov #1200,loopcnt * try for a kill here
- mov #144,bombpt * a multiple of 8
- mov dstval,dst
- loop mov #0,@killpt
- djz start0,loopcnt
- jmp loop
- begin dat 0
- drunk dat 0
- @64
- start0 mov saved1,dwarf1 * restore the bombers
- mov saved2,dwarf2
- mov saved3,dwarf3
- mov saveb,bomber
- spl bomber
- spl dwarves
- jmp fencer
- drunk dat 0 * gets bombed
- @72
- fence3 dat 0
- cleanup pct src * stop imps and go to new
- mov #0,dwarf1 * home (kill the dwarves)
- mov #0,dwarf2
- mov #0,dwarf3
- jmp @begin
- fence4 dat 0
- drunk dat 0
- @80
- watcher cmp #66,@fence1 * wait for someone to step
- jmp watch2 * on the fences
- jmp hfence1
- watch2 cmp #66,@fence2
- jmp watch3
- jmp hfence2
- fence1 dat 0
- @88
- watch3 cmp #66,@fence3
- jmp watch4
- jmp hfence3
- watch4 cmp #66,@fence4
- jmp watcher
- jmp hfence4
- fence2 dat 0
- @95
- bombpt dat 144 * a multiple of 8
- @96
- bomber add #24,bombpt * zip through memory in
- mov #0,@bombpt * the hopes of hitting
- jmp bomber * someone (ha!)
- saveb dat 0
- saved1 dat 0
- saved2 dat 0
- saved3 dat 0
- @104
- runaway mov #0,bomber * we've seen someone!
- mov #0,@fencep * unprotect this spot
- mov #(ending-src),src * move stuff real fast
- jumplp mov @src,@dst * nice short routine
- djz cleanup,src * compliments of KJ
- sub #1,dst
- jmp jumplp
- @112
- fencer mov #66,@fence1 * set up the fences
- mov #66,@fence2
- mov #66,@fence3
- mov #66,@fence4
- mov #66,@fencep
- pct @fencep
- jmp watcher * and watch them
- @120
- hfence1 spl k1 * hit fence 1
- spl k2 * kill dwarves that a
- jmp runaway * five dwarf would anyway
- hfence2 spl k3
- spl k2
- jmp runaway
- k1 mov #0,dwarf1 * kill the dwarf --
- drunk dat 0 * and die
- @128
- hfence3 spl k1 * same idea, other dwarfs
- spl k2
- jmp runaway
- hfence4 spl k2
- spl k3
- jmp runaway
- k2 mov #0,dwarf2
- @136
- dwarf1 add #3,bomb1 * these dwarves are situated so
- mov #0,@bomb1 * that a '5' dwarf in any position
- jmp dwarf1 * will not kill all three of them.
- dwarf2 add #3,bomb2 * kill includes hitting the bombpt
- mov #0,@bomb2
- jmp dwarf2
- k3 mov #0,dwarf3
- @144
- fence9 dat 0
- fencet dat 0
- dstval dat 0
- killpt dat 0
- dwarf3 add #3,bomb3
- mov #0,@bomb3
- jmp dwarf3
- @152
- fencep dat 0
- dwarves mov #20,bomb1 * start off all the dwarves
- mov #20,bomb2
- mov #20,bomb3
- spl dwarf1
- spl dwarf2
- jmp dwarf3
- ending dat 0
- @160
- bomb3 dat 20
- bomb2 dat 20
- bomb1 dat 20
-